\begin{problem}{Pitches}{pitches.in}{pitches.out}{2 seconds}{}{}

     A struggling baseball pitcher is hoping to improve his results 
     by analyzing the statistics of how various batters perform against each 
     of his two types of pitches: his ``fast ball'' and his ``curve ball''. He 
     has developed a model to help him decide which pitch to select 
     in any given circumstance. 

In the game of baseball (slightly simplified for this problem), each 
pitch thrown will result in one of three outcomes: a ``strike'', a 
``ball'', or a ``hit''. If a batter ever gets a hit or accumulates 4 
balls before accumulating 3 strikes, this is a victory for the 
batter. However, if he gets 3 strikes first, this is a 
victory for the pitcher. The running count of balls and strikes 
is collectively referred to as the ``count''. 

For this analysis, both the pitcher and batter are modelled as having 
a table of probabilities computed before the game. For each of the 12 
possible counts, the pitcher has a probability for selecting to throw 
a curve ball instead of a fast ball. Similarly, for each possible count, 
the batter has a probability for expecting the pitcher to throw a curve 
ball. Before each pitch, the pitcher randomly selects which pitch to 
throw and the batter randomly selects which pitch to expect strictly 
according to the probabilities in the table for the current count. 

Computing the optimal values for the probabilities in this table depends on 
the statistics for how the batter performs for each of the 4 possible 
combinations of thrown and expected pitches. These statistics 
will be provided by an 8-element double array, $S$, in the following form: 

{\scriptsize%
\begin{tabular}{|l|l|l|l|l|}
\hline
pitcher throws&batter expects&ball&strike&hit\cr
\hline
fast ball&fast ball&$S_0$&$S_1$&$1-(S_0+S_1)$\cr
fast ball&curve ball&$S_2$&$S_3$&$1-(S_2+S_3)$\cr
curve ball&fast ball&$S_4$&$S_5$&$1-(S_4+S_5)$\cr  
curve ball&curve ball&$S_6$&$S_7$&$1-(S_6+S_7)$\cr
\hline
\end{tabular}}

The pitcher attempts to maximize his chance of getting 3 
strikes, knowing that the batter will be attempting to maximize 
his chance of getting 4 balls or a hit. For a given 
count, the optimal probability for the pitcher to throw 
a curve ball is the probability that minimizes the 
batter's ability to succeed. Similarly, the optimal 
probability for the batter to expect a curve 
ball is the probability that minimizes the pitcher's ability to 
succeed. In other words, the optimal pair of 
probabilities for a given count are such that if either 
the pitcher's or the batter's probability were to change, the 
other would be able to improve their chances by changing 
their probability as well. The optimal pair of probabilities 
forms an equilibrium, where neither the batter nor the 
pitcher can improve their chances if the other does 
not change their probability. 

For example, consider the following (unrealistic) 
statistics: \{ 0, 0, 0, 1, 0, 1, 0, 0 \}, with a count of 3 balls 
and 2 strikes. In this case, if the batter expects the same 
pitch that the pitcher throws, he will get a hit, otherwise, 
it will be a strike. The optimal probabilities are for 
both the pitcher and batter to select a curve ball exactly 50\% 
of the time. 50\% 
is optimal for the pitcher because if he were to prefer 
one pitch or the other, the batter could improve his performance 
by preferring that same pitch. Similarly, 50\% 
is optimal for the batter because if he preferred one pitch 
or the other, the pitcher would be able to take advantage of 
that fact by preferring the opposite pitch. 

Your task is to compute the probability that the pitcher 
will get a total of 3 strikes before the batter gets a hit or a total of 4 balls. 

\InputFile

You are given the statistics $S_0$, $S_1$, $S_2$, $S_3$, $S_4$, $S_5$, $S_6$,
$S_7$ and 
the current number of balls $n$ ($0\le n\le 3$) and strikes $m$ ($0\le m\le 2$).
It is guaranteed that all $S_i$ will be between 0.0 and 1.0, inclusive,
$S_i$+$S_{i+1}$ will be less than or equal to 1.0 for even $i$.

\OutputFile

Output the required probability.
Your return value must have an absolute or relative error less than 1e-9. 

\Example

\begin{example}
\exmp{
0 0 0 1 0 1 0 0 3 2
}{
0.5
}%
\exmp{
0.375 0.25 0.375 0.25 0.375 0.25 0.375 0.25 0 2
}{
0.39208984375
}%
\exmp{
0.33 0 0 1 0.44 0 0 1 2 1
}{
0.0
}%
\exmp{
0 1 0 1 0 0 0 0 2 1
}{
1.0
}%
\end{example}

\end{problem}